window.onload = function(){
	$("#login-in").click(function(){
		$("#login").css("display","block");
		$("#screen").css("display","block");
	})
	$(".close").click(function(){
		$("#login").css("display","none");
		$("#screen").css("display","none");
	})
	$("#screen").click(function(){
		$("#login").css("display","none");
		$("#screen").css("display","none");
	})
	var aUl = document.getElementById("navbar").getElementsByTagName("li");
	for(var i = 0;i < aUl.length; i++){
		aUl[i].index = i;
		aUl[i].onclick = function(){
			//清除所有的下划线显示
			for(var j = 0;j < aUl.length;j++){
				aUl[j].className = "";
			}
			//设置当前为下划线显示
			this.className = "active";
		}
	}
	//获取4个div实现浮出层效果
	(function(){
		var aMood = document.getElementsByClassName("mood");
		var aOut = document.getElementsByClassName("out");
		for(var j = 0;j < aMood.length;j++){
			aMood[j].index = j;
			aMood[j].onmouseover = function(){
				//设置显示当前对应的div
				aOut[this.index].style.display = "block";
			}
			aMood[j].onmouseout = function(){
				//设置显示当前对应的div
				aOut[this.index].style.display = "none";
			}
		}
	})();
	
	
		
}